/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Xadrez.Modelo;

/**
 *
 * @author Jéssica
 */
public class Player {

    private String color;
    private boolean inXeque;

    private Piece[] pieces;
    

    public Player(){

        inXeque = false;
        
        
    }

    public Player(String c){

        color = c;
        inXeque = false;
        pieces = new Piece[16];
    }

    public Move makeMove(Square o, Square n){

        if(o.getPiece().getColor().equals(this.getColor())){
        
            Move m = new Move(o , n);
            return m;
        }
        else return null;

    }

    public String getColor(){

        return this.color;
    }

    public Piece[] getPiece(){
        return this.pieces;
    }

    public void setPiece(Piece p, int i){
        this.pieces[i] = p;
        
    }

    public boolean getXeque(){
        return this.inXeque;
    }

    public void setXeque(boolean x){
        this.inXeque = x;
    }




}
